//
//  CarFind_LetterModel.m
//  CarProjectTest
//
//  Created by lanou on 15/10/24.
//  Copyright © 2015年 完美的宇gogo. All rights reserved.
//

#import "CarFind_LetterModel.h"

@implementation CarFind_LetterModel



-(void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqualToString:@"brands"])
    {
        _brands = [NSMutableArray array];
        for (NSDictionary *dic in value)
        {
            if ([dic[@"name"] isEqualToString:@"奥迪"])
            {
                CarFind_aodiModel *model = [[CarFind_aodiModel alloc]init];
                [model setValuesForKeysWithDictionary:dic];
                [_brands addObject:model];
            }
            else
            {
                CarFind_BrandsModel *model = [[CarFind_BrandsModel alloc]init];
                [model setValuesForKeysWithDictionary:dic];
                [_brands addObject:model];
            }
        }
    }
    else
    {
        [super setValue:value forKey:key];
    }
}







@end
